import {
  Base
} from 'base.js';

class MemberModel extends Base {
  constructor() {
    super();
  }
  /**
   * 会员资产汇总查询
   */
  userAssetSummary(data) {
    return this.promiseRequest('/wechat/applet/user/asset/summary', data)
  };
  /**
   * 微信会员信息
   */
  userInfo(data, needStatus, hideLoading, noRefetch) {
    return this.promiseRequest('/wechat/applet/user/info', data, needStatus, hideLoading, noRefetch)
  };
  /**
   * 会员资料更新
   */
  userUpdate(data) {
    return this.promiseRequest('/wechat/applet/user/update', data)
  };
  /**
   * 微信会员码
   */
  userCode(data) {
    return this.promiseRequest('/wechat/applet/user/code', data)
  };
  /**
   * 获取微信会员资产详情
   */
  userAssetDetail(data) {
    return this.promiseRequest('/wechat/applet/user/asset/detail', data)
  };
  /**
   * 获取会员卡列表
   */
  userCardList(data) {
    return this.promiseRequest('/wechat/applet/user/card/list', data)
  };
  /**
   * 绑卡
   */
  userCardBinding(data) {
    return this.promiseRequest('/wechat/applet/user/card/binding', data)
  };
  /**
   * 获取验证码
   */
  userVerificationCode(data) {
    return this.promiseRequest('/wechat/applet/user/verification/code', data, '', true)
  };
  /**
   * 卡注销
   */
  userCardLogout(data) {
    return this.promiseRequest('/wechat/applet/user/card/logout', data)
  };

  /**
   * 获取游戏券列表
   */
  userGameCoupon(data) {
    return this.promiseRequest('/wechat/applet/user/game/coupon', data)
  };
  /**
   * 获取兑换券列表
   */
  userExchangeCoupon(data) {
    return this.promiseRequest('/wechat/applet/user/exchange/coupon', data)
  };

  /**
   * 获取优惠券列表
   */
  userDiscountCoupon(data) {
    return this.promiseRequest('/wechat/applet/user/discount/coupon', data, true)
  };
  /**
   * 获取会员权益
   */
  userMemberPower(data) {
    return this.promiseRequest('/wechat/applet/user/benefit', data)
  };
  /**
   * 获取成长规则
   */
  userGrowRule(data) {
    return this.promiseRequest('/wechat/applet/user/rule', data)
  };
  /**
   * 资产合并
   */
  assetTransfer(data) {
    return this.promiseRequest('/wechat/applet/user/transfer', data)
  };
  /** 
   * 刷新动态码 
   */
  codeDynamic(data) {
    return this.promiseRequest('/electroncode/code/dynamic/v2/add?electron_code=' + data.electron_code, data)
  };
  /** 
   * 电子码查询 
   */
  codeQuery(data) {
    return this.promiseRequest('/electroncode/code/query?electron_code=' + data.electron_code, data)
  };
  /** 
   * 获取完善资料活动积分配置
   */
  userActivityInfo(data) {
    return this.promiseRequest('/wechat/applet/user/activity/info', data)
  };
  /** 
   * 门店游戏券列表
   */
  gameCouponDetail(data) {
    return this.promiseRequest('/wechat/applet/user/game/coupon/detail', data)
  };

  /** 
   *  币月明细
   */
  coinMonthDetail(data) {
    return this.promiseRequest('/wechat/applet/user/coin/month_detail', data, true)
  };
  /** 
   *  币日明细
   */
  coinDayDetail(data) {
    return this.promiseRequest('/wechat/applet/user/coin/day_detail', data, true)
  };
  /** 
   *  票明细
   */
  userTicketDetail(data) {
    return this.promiseRequest('/wechat/applet/user/ticket/detail', data, true)
  };
  /** 
   *  积分明细
   */
  userRewardPointsDetail(data) {
    return this.promiseRequest('/wechat/applet/user/reward_points/detail', data, true)
  };
  /** 
   *  订单明细
   */
  userOrderDetail(data) {
    return this.promiseRequest('/wechat/applet/user/order/detail', data, true)
  };
  /** 
   *  给用户发消息模板
   */
  userMessage(data) {
    return this.promiseRequest('/wechat/message/form/add', data, false, true)
  }
  /** 
   *  成长记录经验值
   */
  userExpList(data) {
    return this.promiseRequest('/wechat/applet/user/exp/list', data, true)
  };
  /** 
   *  新人大礼包
   */
  registerGift(data) {
    return this.promiseRequest('/wechat/applet/user/register/gift', data, false, true)
  }
  /** 
   *  新人大礼包查询活动
   */
  registerActivity(data) {
    return this.promiseRequest('/wechat/marketing/activity/register/info', data, false, true)
  }
  registerGift(data) {
    return this.promiseRequest('/wechat/applet/user/register/gift', data, false, true)
  }
  /** 
   *  查询消息列表
   */
  getMessages(data) {
    return this.promiseRequest('/wechat/member/message/list', data)
  }
  /** 
   *  获取未读消息数量
   */
  getUnreadNum(data) {
    return this.promiseRequest('/wechat/member/message/num', data, false, true)
  }
  /** 
   *  更新消息信息
   */
  updateMessage(data) {
    return this.promiseRequest('/wechat/member/message/save', data, false, true)
  }
  /** 
   *  svip套餐详情查询
   */
  svipQuery(data) {
    return this.promiseRequest('/wechat/product/svip/query', data)
  }
  /** 
   *  赠币券立即使用充资产
   */
  userCouponUse(data) {
    return this.promiseRequest('/wechat/applet/user/coupon/use', data)
  }
  /** 
   *  查询商户所有标签
   */
  userTags(data) {
    return this.promiseRequest('/wechat/applet/user/tags', data)
  }
  /** 
   *  赠品查询接口
   */
  getGiftList(data) {
    return this.promiseRequest('/wechat/marketing/activity/gift/list', data, true)
  }
  /** 
   *  赠品查询接口
   */
  takeGift(data) {
    return this.promiseRequest('/wechat/marketing/activity/gift/take', data)
  }
  /** 
   *  小程序订阅消息模块查询
   */
  subscribeMessage(data) {
    return this.promiseRequest('/wechat/message/subscribe/template/query', data, false, true)
  }
  /** 
   *  
   */
  userShopAsset(data) {
    return this.promiseRequest('/wechat/applet/user/shop/asset', data)
  }

};
export {
  MemberModel
}